﻿<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>天气预报</title>
<link href="uisy/drivers/daluzai.css" rel="stylesheet" type="text/css">
<link href="uisy/drivers/prviate.css" rel="stylesheet" type="text/css">
<script src="uisy/sprite/jquery.js"></script>
<script src="uisy/sprite/daluzai.js" language="javascript" type="text/javascript" charset="UTF-8"></script>
<script src="uisy/sprite/weather.js" language="javascript" type="text/javascript" charset="UTF-8"></script>
<script src="uisy/sprite/common.js" language="javascript" type="text/javascript" charset="UTF-8"></script>
<!--[if IE 6]><script src="uisy/sprite/debug_ie6.js" language="javascript" type="text/javascript" charset="UTF-8"></script><![endif]-->
</head>
<body>
<div class="clear_36"></div>
<form action="#" onSubmit="return false;">
	
    
    <dl class="weather_case">
        <dt class="weather_search_def"></dt>
        <dd class="weather_search_v form_val" id="weather_search">
            <input name="city" type="text" style="width:205px"/>
          <br/><a href="javascript:jintian('汕头');" style="text-decoration: NONE;color:#0097EE">汕头</a>&nbsp;&nbsp;<a href="javascript:jintian('揭阳');" style="text-decoration: NONE;color:#0097EE">揭阳</a>&nbsp;&nbsp;<a href="javascript:jintian('潮州');" style="text-decoration: NONE;color:#0097EE">潮州</a>&nbsp;&nbsp;<a href="javascript:jintian('香港');" style="text-decoration: NONE;color:#0097EE">香港</a>&nbsp;&nbsp;<a href="javascript:jintian('广州');" style="text-decoration: NONE;color:#0097EE">广州</a>&nbsp;&nbsp;<a href="javascript:jintian('北京');" style="text-decoration: NONE;color:#0097EE">北京</a>&nbsp;&nbsp;<a href="javascript:jintian('上海');" style="text-decoration: NONE;color:#0097EE">上海</a>
        </dd>
        <dd  class="common_front weather_conn form_sub" id="weather_sub">
            <input name="call" type="button" value="查询" title="查询天气预报" />
            
        </dd>
        <dd class="clear_07">&nbsp;</dd>
        <dd class="clear_07">&nbsp;</dd>
        <dd class="clear_07">&nbsp;</dd>        
        <dd class="weather_author" style="display:none" id="weather_author"></dd>
    </dl>
</form>
<div class="clear_13"></div>
<div class="weather_res_case common_hide" id="weather_res_case">
    <dl class="weather_res_item weather_res_stoday">
        <dd><b id="city"></b></dd>
        <dd>实时气温:<span id="temperature"></span></dd>
        <dd>天气情况:<span id="weather"></span></dd>
        <dd>风向情况:<span id="direction"></span></dd>
        <dd>风力情况:<span id="wind"></span></dd>
    </dl>
    <dl class="weather_res_item weather_res_today">
        <dd class="weather_res_dis_img" id="T_weather_img"></dd>
        <dd>
            <h2>今天</h2>
        </dd>
        <dd>天气情况:<span id="T_weather"></span></dd>
        <dd>气温:<span id="T_temperature"></span></dd>
        <dd>风向:<span id="T_direction"></span></dd>
    </dl>
    <dl class="weather_res_item weather_res_tmw">
        <dd class="weather_res_dis_img" id="M_weather_img"></dd>
        <dd>
            <h2>明天</h2>
        </dd>
        <dd>天气情况:<span id="M_weather"></span></dd>
        <dd>气温:<span id="M_temperature"></span></dd>
        <dd>风向:<span id="M_direction"></span></dd>
    </dl>
    <dl class="weather_res_item weather_res_aftmw">
        <dd class="weather_res_dis_img"  id="L_weather_img"></dd>
        <dd>
            <h2>后天</h2>
        </dd>
        <dd>天气情况:<span id="L_weather"></span></dd>
        <dd>气温:<span id="L_temperature"></span></dd>
        <dd>风向:<span id="L_direction"></span></dd>
    </dl>
    <div class="clear_debug"></div>
</div>
<div class="clear_13"></div>
<div class="query_weather_share share_case"><span onclick="shareWeather('qzone')" title="分享到QZone" class="share_qzone share_ga">分享到QZone</span><span onclick="shareWeather('sina')" title="分享到新浪微博" class="share_sina share_ga">分享到新浪微博</span><span onclick="shareWeather('tqq')" title="分享到腾讯微博" class="share_tweibo share_ga">分享到腾讯微博</span></div>

<script type="text/javascript">
//创建天气预报核心对象
var weather_=new weather();

//设置样式
weather_.getStyle('qq');

//输入框的默认提示
def_value('weather_search','请输入要查询的城市名称');

//监听用户事件
onEvent.onEvent();

var city = "";
$(document).ready(function(){
$.getScript('http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js',function(){
city=remote_ip_info.city;
jintian(city);

 })
});

function jintian(city){
	uisy.query('search');
        weather_.getWeather(city,'js');
        };
        
/**
分享天气预报
*/
function shareWeather(type){
	var docu='【' + $('#city').text() +'今天的天气情况】今天的气温：'+$('#T_temperature').text()+' ，天气情况：'+$('#T_weather').text()+' ，风向情况：'+$('#T_direction').text();  
	var get_img = document.URL.replace('index.html','') + $.trim($('#T_weather_img img').attr("src"));
	alert(get_img);	
	share(docu,get_img,type);
}        
</script>
</body>
</html>